package com.socialnetspace.web;

import java.io.IOException;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.springframework.security.web.RedirectStrategy;

public class CustomFailureRedirection implements RedirectStrategy 
{

	@Override
	public void sendRedirect(HttpServletRequest request, HttpServletResponse response,
            String url) throws IOException {
		
		String contextPath = request.getContextPath();
		response.sendRedirect(contextPath+"/login?login_error=1");
	}

}
